package cn.edu.neusoft.wuguangsheng.market.model;

import cn.edu.neusoft.wuguangsheng.market.bean.RegisterBean;
import cn.edu.neusoft.wuguangsheng.market.iface.BuyOneIface;
import cn.edu.neusoft.wuguangsheng.market.listener.TListener;
import cn.edu.neusoft.wuguangsheng.market.service.AllService;
import retrofit2.Call;
import retrofit2.Retrofit;

/**
 * Created by little on 2018/4/16.
 */

public class BuyOneModel extends RetrofitBaseModel implements BuyOneIface<RegisterBean> {

    private AllService allService;
    private Retrofit retrofit;
    public BuyOneModel(){
        retrofit=getRetrofit();
        allService=getAllService();
    }

    @Override
    public void buyOneFood(String uid, String fid, String num, double sum, String suggesttime,String mrid, TListener<RegisterBean> tListener) {
        Call<RegisterBean> call=allService.BuyOneFoods(uid,fid,num,sum,mrid,suggesttime);
        callenqueue(call,tListener);
    }
}
